# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""
from functools import wraps


def auth(func):
    @wraps(func)   # 伪装的更彻底
    def inner(*args,**kwargs):
        print('前')
        ret = func(*args,**kwargs)
        print('后')
        return ret
    return inner


@auth
def index():
    print('index')


@auth
def detail():
    print('index')


print(index.__name__)
print(detail.__name__)